<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
	<head profile="http://gmpg.org/xfn/11">
		<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ) ?>; charset=<?php bloginfo( 'charset' ) ?>" />
		<title><?php wp_title( '|', true, 'right' ); bloginfo( 'name' ); ?></title>
<?php do_action( 'wp_head' ) ?>
		<?php do_action( 'bp_head' ) ?>
		<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
		<link rel="pingback" href="<?php bloginfo( 'pingback_url' ) ?>" />

		<?php
			if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) )
				wp_enqueue_script( 'comment-reply' );

			wp_head();
		?>
		
	</head>

	<body <?php body_class() ?> id="bp-default">

		<?php do_action( 'bp_before_header' ) ?>
		<div id="header">
			<a id="box-link" href="<?php echo get_home_url()?>"></a>
			<div id="search-bar" role="search">
				<div class="padder">
					<h1 id="logo" role="banner"><a href="<?php echo home_url(); ?>" title="<?php _ex( 'Home', 'Home page banner link title', 'buddypress' ); ?>"><?php bp_site_name(); ?></a></h1>
						<form action="<?php echo bp_search_form_action() ?>" method="post" id="search-form">
							<label for="search-terms" class="accessibly-hidden"><?php _e( 'Search for:', 'buddypress' ); ?></label>
							<input type="text" id="search-terms" name="search-terms" value="<?php echo isset( $_REQUEST['s'] ) ? esc_attr( $_REQUEST['s'] ) : ''; ?>" />

							<?php echo bp_search_form_type_select() ?>

							<input type="submit" name="search-submit" id="search-submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />

							<?php wp_nonce_field( 'bp_search_form' ) ?>

						</form><!-- #search-form -->

				<?php do_action( 'bp_search_login_bar' ) ?>

				</div><!-- .padder -->
			</div><!-- #search-bar -->
			
			<?php do_action( 'bp_header' ) ?>
		</div><!-- #header -->
        
         <!----NAVIGATION----->
		<?php do_action( 'bp_after_header' ) ?>
     
        <div id="navigation" role="navigation">

         <?php if ( is_user_logged_in() ) {
		 	wp_nav_menu( array( 'container' => false,  'theme_location' => 'primary', 'fallback_cb' =>'bp_dtheme_main_nav' ) ); 	
		?> 
			<style type="text/css">
				#container{
					left:110px;
					position:relative;
					width:91% !important;
					} /*LINES PAGE UP*/
			</style>
			<?php } ?>
			<!----LINKS PROFILE NAV TO USERS PROFILE----->
               <ul id="profile-navigation" class="menu">
                	<li id="menu-item-78" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-78" ><a href="<?php echo bp_loggedin_user_domain() ?>">
					<?php if ( is_user_logged_in() ) echo Profile ?></a></li>
                        </ul>
						
       		 </div>
			 <!----Highlight profile button----->
					<?php $current_page_URL = "http://".$_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
						  $user_profile_url = bp_loggedin_user_domain();
							if( $current_page_URL == $user_profile_url ){?>
								<style type="text/css">
									#profile-navigation a{
									background:#CD3700;
									}
								</style>
							<?php }else{?>
								<style type="text/css">
									#profile-navigation a{
									background: #EE7600;
									}
								</style>
							<?php } ?>

		
		<?php
if ( is_page('Groups') ) { $current = 'groups'; }


?>
		<?php do_action( 'bp_before_container' ) ?>
           
		<div id="container">
        
       
